package com.t14;

/**
 * Created by xuyiwei on 2018/8/7.
 */
class Building{}
class House extends Building{}
public class ClassCasts {
    public static void main(String[] args) {
        Building b = new House();
        Class<House> houseClass = House.class;
        House house = houseClass.cast(b);
        //跟强行转换类似
        house = (House) b;
    }
}
